﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace LoveEat.MODEL
{
    public class Result
    {
        /// <summary>
        /// 是否错误，true：是，false：否
        /// </summary>
        public bool IsError { set; get; }
        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrMsg { set; get; }
        //数据
        public object Data { set; get; }

        public string ReturnUrl { get; set; }

        public string Message { get; set; }

        /// <summary>
        ///最新赞数
        /// </summary>
        public int PraiseCount { set; get; }

        /// <summary>
        ///最新坑数
        /// </summary>
        public int BelittleCount { set; get; }
    }

    [DataContract]
    public class Result<T>
    {
        /// <summary>
        /// 是否错误，true：是，false：否
        /// </summary>
        [DataMember]
        public bool IsError { set; get; }
        /// <summary>
        /// 错误信息
        /// </summary>
        [DataMember]
        public string ErrMsg { set; get; }

        //数据

        [DataMember]
        public T Data { set; get; }

    }
}
